/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-15 18:05:25
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\form\uiDownload.js
 * @CIMC-V2
 */
import { exInput, exIcon, exSizeSelect, exSelect, exSwitch, exRequestData } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiDownload',
  name: '导出',
  icon: 'file-download-line',
  svg: 'daochu',
  //数据别名
  // dataName: 'uiDownload_data',
  //数据集合 表单 列表等等
  data: {
    requestData: {},
  },
  extension: {
    '#WRITE_FIELD_ROWS#': exSwitch('是否导出字段行', false),
    apiUrl: exInput('接口地址', '', '不填写就跟着系统如：/wms/wms-web'),
    apiMethod: exInput('method', ''),
    // getFrom: exInput('绑定表单', ''),
    setParam: {
      type: 'exDownloadParam',
      name: '导出配置',
      title: '导出配置',
      value: [],
    },
    keyInterchange: exRequestData('绑定表单KEY替换', []),
    // getFrom: {
    //   type: 'exGetDownload',
    //   name: '绑定表单',
    //   title: '绑定表单',
    //   value: [],
    //   hasCheckbox: false,
    //   treeData: '$getPageModules',
    // },
    // getTable: exInput('下载表格', ''),
    size: exSizeSelect('尺寸', 'mini'),
    icon: exIcon('图标选择器', ''),
    value: exInput('名称', '导出'),
    type: exSelect('颜色类型', '', [
      { value: '', label: '默认' },
      { value: 'text', label: '文字' },
      { value: 'primary', label: '蓝色' },
      { value: 'success', label: '绿色' },
      { value: 'info', label: '灰色' },
      { value: 'warning', label: '黄色' },
      { value: 'danger', label: '红色' },
    ]),
    round: exSelect('圆角', false, [
      { value: true, label: '是' },
      { value: false, label: '否' },
    ]),
    circle: exSelect('圆形', false, [
      { value: true, label: '是' },
      { value: false, label: '否' },
    ]),
    plain: exSelect('朴素按钮', false, [
      { value: true, label: '是' },
      { value: false, label: '否' },
    ]),
    disabled: exSwitch('禁用', false),
    hidden: exSwitch('隐藏', false),
    detailDownload: exSwitch('导出明细', false),
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
}
